import types


class Cat:
    pass


def meomw(self):
    return f"{self.name},喵喵"


def __get__(fun, instance):

    return types.MethodType(fun, instance)


meomw.__get__ = __get__


# print(dir(meomw))


cat1, cat2 = Cat(), Cat()
cat1.name = "小黑"
cat2.name = "小白"

# Cat.speak = meomw


cat1.speak = meomw.__get__(meomw, cat1)
cat2.speak = meomw.__get__(meomw, cat2)

print(cat1.speak())
print(cat2.speak())
